import 'package:backend.core/core/domain/entities/api/web/api_web_bank_card_type.dart';
import 'package:backend.core/core/domain/entities/web/web_bank_card_type.dart';

abstract class CreateApiWebBankCardTypeFromIntenalOne {
  ApiWebBankCardType call({
    required WebBankCardType cardType,
  });
}

class CreateApiWebBankCardTypeFromIntenalOneImpl implements CreateApiWebBankCardTypeFromIntenalOne {
  const CreateApiWebBankCardTypeFromIntenalOneImpl();

  @override
  ApiWebBankCardType call({
    required WebBankCardType cardType,
  }) {
    switch (cardType) {
      case WebBankCardType.visa:
        return ApiWebBankCardType.visa;
      case WebBankCardType.mastercard:
        return ApiWebBankCardType.mastercard;
      case WebBankCardType.mir:
        return ApiWebBankCardType.mir;
      case WebBankCardType.unionPay:
        return ApiWebBankCardType.unionPay;
      case WebBankCardType.jcb:
        return ApiWebBankCardType.jcb;
      case WebBankCardType.americanExpress:
        return ApiWebBankCardType.americanExpress;
      case WebBankCardType.dinersClub:
        return ApiWebBankCardType.dinersClub;
      case WebBankCardType.discoverCard:
        return ApiWebBankCardType.discoverCard;
      case WebBankCardType.instaPayment:
        return ApiWebBankCardType.instaPayment;
      case WebBankCardType.instaPaymentTM:
        return ApiWebBankCardType.instaPaymentTM;
      case WebBankCardType.laser:
        return ApiWebBankCardType.laser;
      case WebBankCardType.dankort:
        return ApiWebBankCardType.dankort;
      case WebBankCardType.solo:
        return ApiWebBankCardType.solo;
      case WebBankCardType.switchCard:
        return ApiWebBankCardType.switchCard;
      case WebBankCardType.unknown:
        return ApiWebBankCardType.unknown;
    }
  }
}
